/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Gleydson
 */
@Entity
@Table(name = "professor")
@XmlRootElement
public class Professor extends Usuario implements Serializable {
    
    @Column(name = "matricula")
    private String matricula;
    @JoinTable(name = "monitor_tem_professor", joinColumns = {
        @JoinColumn(name = "professor", referencedColumnName = "login")}, inverseJoinColumns = {
        @JoinColumn(name = "monitor", referencedColumnName = "login")})
    @ManyToMany
    private List<Monitor> monitorList;
    @OneToMany(mappedBy = "professor")
    private List<Reservas> reservasList;
    @OneToOne(cascade = CascadeType.ALL, mappedBy = "professor1")
    private ProfessorReservaRack professorReservaRack;
    @OneToOne(cascade = CascadeType.ALL, mappedBy = "professor")
    private ProfessorReservaEquipamento professorReservaEquipamento;

    public Professor() {
    }

    public String getMatricula() {
        return matricula;
    }

    public void setMatricula(String matricula) {
        this.matricula = matricula;
    }

    @XmlTransient
    public List<Monitor> getMonitorList() {
        return monitorList;
    }

    public void setMonitorList(List<Monitor> monitorList) {
        this.monitorList = monitorList;
    }

    @XmlTransient
    public List<Reservas> getReservasList() {
        return reservasList;
    }

    public void setReservasList(List<Reservas> reservasList) {
        this.reservasList = reservasList;
    }

    public ProfessorReservaRack getProfessorReservaRack() {
        return professorReservaRack;
    }

    public void setProfessorReservaRack(ProfessorReservaRack professorReservaRack) {
        this.professorReservaRack = professorReservaRack;
    }

    public ProfessorReservaEquipamento getProfessorReservaEquipamento() {
        return professorReservaEquipamento;
    }

    public void setProfessorReservaEquipamento(ProfessorReservaEquipamento professorReservaEquipamento) {
        this.professorReservaEquipamento = professorReservaEquipamento;
    }


}
